﻿using System.Collections.Generic;
using TestBat.IModels.Domain;

namespace TestBat.IModels.Models
{
    public interface ITraineeModel : IModel
    {
        /// <summary>
        /// get a trainee by ID
        /// </summary>
        /// <param name="traineeID">the ID</param>
        /// <returns>the found trainee or null, if none is found</returns>
        //ITrainee GetByID(Guid traineeID);

        /// <summary>
        /// save/persist a trainee
        /// </summary>
        /// <param name="trainee">the trainee</param>
        void Save(ITrainee trainee);

        /// <summary>
        /// remove the trainee from the DB
        /// </summary>
        /// <param name="trainee">the trainee to remove</param>
        void Delete(ITrainee trainee);

        /// <summary>
        /// revert a trainee back to database-state
        /// </summary>
        /// <param name="trainee">the trainee</param>
        void Revert(ITrainee trainee);

        void AddTraineeGroup(ITrainee trainee, ITraineeGroup traineeGroup);
        void RemoveTraineeGroup(ITrainee trainee, ITraineeGroup traineeGroup);

        IList<ITrainee> GetAll();

        bool CheckTraineeCredentials(string username, string password);

        ITrainee GetByUsername(string username);
    }
}
